package com.cari.oa.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

/**
* Title: SoftBugEntity
* Description:bug实体
* Company: cari 
* @author    hjx 
* @date       2013-1-29
*/
@Entity
@Table(name = "T_BUG")
public class SoftBugEntity implements Serializable{
	
	private static final long serialVersionUID = 2865480685881716089L;

	/**
     * ID
     */
	@Id
	@Length(max = 32)
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	private String id;           
    
    /**
     * bug标题
     */
    @NotNull(message = "bug标题不能为空")
    @Column(name = "title")
    @Length(max = 500, message = "bug标题长度要小于500个字符")
	private String title;  
    
    /**
     * 创建时间
     */
    @Column(name = "CREATE_TIME")
	private Date createTime = new Date();    
	
	/**
	 * 所属模块
	 */
    @Column(name = "MODULE_ID")
	private String moduleId;  
	
    /**
	 * 状态（bug的状态：(new、open、fix、close、reopen、reject）
	 */
    @Column(name = "STATUS")
	private String status;
    
    /**
     * 提交人
     */
    @Column(name = "SUBMITTER_ENNAME")
    private String subEnname;
    
    /**
     * 等级（高，中，低）
     */
    @Column(name = "BUG_LEVEL")
    private String bugLevel;
    
    /**
     * 描述
     */
    @NotNull(message = "bug描述不能为空")
    @Column(name = "DESCRIPTION")
    private String description;  
    
    /**
     * 关闭时间
     */
    @Column(name = "CLOSE_TIME")
    private  Date closeTime;    
    
    /**
     *  所属项目
     */
    @Column(name = "PROJECT_ID")
    private String projectId;
    
    /**
     * 修订人员
     */
    @Column(name = "EXPURGATOR")
    private String expurgator;
    
    /**
     * 修订人员中文名
     */
    @Column(name = "EXPURGATOR_CN")
    private String expurgatorCn;
   
    
    /**
     * 是否有附件(1:有 ，0：无)
     */
    @Column(name = "ISATTR")
    private Integer isAttr=0;
    
    /**
     * 提交人中文名
     */
    @Column(name = "SUBMITTER_CNNAME")
    private String subCnname;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getModuleId() {
		return moduleId;
	}

	public void setModuleId(String moduleId) {
		this.moduleId = moduleId;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSubEnname() {
		return subEnname;
	}

	public void setSubEnname(String subEnname) {
		this.subEnname = subEnname;
	}

	public String getBugLevel() {
		return bugLevel;
	}

	public void setBugLevel(String bugLevel) {
		this.bugLevel = bugLevel;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCloseTime() {
		return closeTime;
	}

	public void setCloseTime(Date closeTime) {
		this.closeTime = closeTime;
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public String getExpurgator() {
		return expurgator;
	}

	public void setExpurgator(String expurgator) {
		this.expurgator = expurgator;
	}

	public Integer getIsAttr() {
		return isAttr;
	}

	public void setIsAttr(Integer isAttr) {
		this.isAttr = isAttr;
	}

	public String getExpurgatorCn() {
		return expurgatorCn;
	}

	public void setExpurgatorCn(String expurgatorCn) {
		this.expurgatorCn = expurgatorCn;
	}

	public String getSubCnname() {
		return subCnname;
	}

	public void setSubCnname(String subCnname) {
		this.subCnname = subCnname;
	}
}
